package com.binfenhulian.chinaenergy.ces.crawler.task;

import com.binfenhulian.chinaenergy.ces.crawler.dispatcher.TaskDispatcher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by wanghjbuf on 2018/3/20.
 */
@Component("com.binfenhulian.chinaenergy.ces.crawler.task.CrawlerTask")
public class CrawlerTask {

    @Autowired
    TaskDispatcher taskDispatcher;

    /**
     * 执行定时任务
     */
    @Scheduled(cron= "0 0 6 * * ?")
    public void doTask() {
        taskDispatcher.doDispatch();
    }
}
